<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/images/module.css"/>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/images/css.css"/>
<script type="text/javascript" src="__PUBLIC__/js/jquery-1.4.1.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/showdate.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/webox/js/jquery-webox.js"></script>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/js/webox/image/jquery-webox.css"/>
<title>网站资源列表-<{$U.username}> 的外链管理</title>
<script>
    function add(){
        $.webox({
            height:180,
            width:610,
            bgvisibel:true,
            title:'添加网站',
            iframe:"<{:U('link/add')}>"
        });
    }
    function del(linkid){
        $.get("<{:U('link/del')}>",{"linkid":linkid},function(msg){
            if(!msg.status || msg.status!="1"){
                alert('删除失败');
            }else{
                window.location.reload();
            }
        })
    }
    function edit(linkid){
        if(isNaN(linkid)){
            return false;
        }
        $.webox({
            height:300,
            width:610,
            bgvisibel:true,
            title:'编辑外链',
            iframe:"<{:U('link/edit',array('linkid'=>'"+linkid+"'))}>"
        });
        
    }
    function checklink(){
        $.webox({
            height:200,
            width:410,
            bgvisibel:true,
            title:'检测外链',
            iframe:"<{:U('check/index')}>"
        });
    }
</script>
</head>
<body>
<!--top-->
<div class='header' id='header'>
<div id='header_relative'>
<div><a class='headerlogo' href="<{:U('Index/index')}>"></a></div>
<div class='msglogin'>
亲爱的 [<a href='#'><{$U.username}></a>] 今天<{$Think.now}>&nbsp;&nbsp;&nbsp;
[<a href='javascript:void(0)' target='_blank'>帮助</a>]
[<a href="<{:U('Plus/logout')}>">退出</a>]
</div>
<div class='serviceset'>
</div>
<ul class='menu'>
 <li><a href='<{:U('Index/index')}>'  >系统管理</a></li>
 <li><a href='<{:U('link/index')}>' class='onlink'>外链列表</a></li>
 <li><a href='<{:U('source/index')}>'>网站列表</a></li>
</ul>
<div class="statistics">
</div>

</div>
</div>
<!--/top-->

<!--left-->
<div class='leftbox' id='leftbox'>
<h3 class='f14'><i></i>功能菜单</h3>
<ul id='leftbox-submenu' class='submenu'>
    <li class='onlink'><a href='<{:U('link/index')}>'>站点列表</a></li>
    <li><a href='#' onclick="add();return false;">添加外链</a></li>
    <li><a href='#' onclick="checklink();return false;">检测外链</a></li>
</ul>
</div>
<!--/left-->

<!--right-->
<div class="sitemap" id="sitemap">
	当前位置:系统管理 &gt; <a href="<{:U('source/index')}>">外链列表</a>
</div>
    <div class="rightbox" id="rightbox">
        <div class="maincontent">
            <div class="mainoutside" id="tip">
                <div id="secmainoutside">
                    <div class="mainarea_shop">
                        <div class="servicesearch mt10">
                            <form method="get" action="<{:U('link/index')}>">
                            外链地址包含:<input type="text"  name="urlwd" size="8"class="text"/>&nbsp;&nbsp;
                            关键词包含:<input type="text" id="wd" name="wd" size="8"class="text"/>&nbsp;&nbsp;
                            类型:<select name="stype"><option value="-1" selected>全部</option><option value="0">论坛</option><option value="1">博客</option><option value="2">问答</option><option value="3">评论</option><option value="4">分享</option><option value="5">网盘</option><option value="6">视频</option></select>&nbsp;&nbsp;
                            发布:<select name="pubstatus"><option value="-1" selected>全部</option><option value="1" style="color:green">正常</option><option value="0" style="color:red">被删</option></select>&nbsp;&nbsp;
                            收录:<select name="bdstatus"><option value="-1" selected>全部</option><option value="0">等待收录</option><option value="1" style="color:green">正常</option><option value="2" style="color:red">被k</option></select>&nbsp;&nbsp;
                            发布日期:<input type="text" id="st" name="st" onclick="return Calendar('st');" value="" class="text" style="width:85px;"/>-<input type="text" id="et" onclick="return Calendar('et');" value="" name="et" class="text" style="width:85px;"/>
                            <button type="submit" class="butsubmit" id="btn-search">查询</button>
                            </form>
                        </div>
                    </div>

                    <!--内容-->
                    <table class="mainlist">
                        <thead>
                            <tr>
                                <td width="4%">ID</td>
                                <td width="4%">类别</td>
                                <td align="left">外链地址</td>
                                <td width="7%">关键词</td>
                                <td width="7%">状态</td>
                                <td width="15%">发布时间</td>
                                <td width="15%">最后检测时间</td>
                                <td width="10%">操作</td>
                            </tr>
                        </thead>
                        <tbody>
                            <volist name="linklist" id="link">
                            <tr>
                                <td align="center"><{$link.linkid}></td>
                                <td align="center"><a href="<{:U('link/index?stype='.$link['stype'])}>"><?php echo $stype[$link['stype']];?></a></td>
                                <td align="left"><a href="<{$link.link}>" target="_blank"><{$link.link}></a></td>
                                <td align="center"><{$link.word}></td>
                                <td align="center">关键词:<eq name="link['pubstatus']" value="1"><font color="green">正常</font><else/><font color="red">被删</font></eq><br/>收录况:<eq name="link['bdstatus']" value="1"><font color="green">正常</font><else/><eq name="link['bdstatus']" value="0">未收<else/><font color="red">被K</font></eq></eq></td>
                                <td align="center"><{$link.pubdate|date="y-m-d H:i:s",###}></td>
                                <td align="center"><if condition="$link['lastcheck'] eq 0">未检测<else/><{$link.lastcheck|date="y-m-d H:i:s",###}></if></td>
                                <td align="center"><a href="#" onclick="edit(<{$link.linkid}>);return false;">编辑</a> <a href="#" onclick="del(<{$link.linkid}>);return false;">删除</a></td>
                            </tr>
                            </volist>
                        </tbody>
                    </table>
                    <!--分页-->
                    <div class="pages"><{$show}></div>
                </div>
            </div>
        </div>
    </div>
<!--/right-->
</body>
</html>